//This is an implementation if the Timer class that allows
//access to a windows high performance timer to provide basic 
//timer functionality in the Helix application

#ifndef _HELIX_HIGH_PERFORMANCE_TIMER_H_
#define _HELIX_HIGH_PERFORMANCE_TIMER_H_


#include "Helix.h"
#include "HObject.h"
#include "Timer.h"

namespace helix		//Put this in the helix namespace
{

	#define HIGH_PERFORMANCE_TIMER_LONG_SIZE 4294967295

	class MY_CLASS HighPerformanceTimer : public Timer, public HObject
	{
	private:
		LARGE_INTEGER		lastTickCount;				// Tick Counter of high preformance counter
		LARGE_INTEGER       ticFrequency;               // frequency of high performance counter

		double seconds;
	public:
		HighPerformanceTimer();
		virtual ~HighPerformanceTimer();

		virtual long int resolution();		//get the ticks per second of the timer
		virtual long int lastTime();		//get the number of ticks of the timer of the last update
		virtual long int thisTime();		//get the current number of ticks of the timer

		virtual void updateTime();		//update the timer and calculate the time difference between now and the last update
		virtual double dSeconds();		//get the time difference between the last two updates in seconds
	};

}

#endif

